import { Component, OnInit } from '@angular/core';

export class Zuowu {
  id: number;
  name: string;
}

const Zuowus: Zuowu[] = [
  { id: 1, name: '苹果' },
  { id: 2, name: '香蕉' },
  { id: 3, name: '梨' },
  { id: 4, name: '菠萝' },
];

@Component({
  selector: 'app-tip3',
  templateUrl: './tip3.component.html',
  styleUrls: ['./tip3.component.css']
})

export class Tip3Component implements OnInit {
	zuowus = Zuowus;
	
	selectedZuowu: Zuowu;
  onSelect(zuowu: Zuowu): void {
    this.selectedZuowu = zuowu;
  }
  constructor() { }

  ngOnInit() {
  }

}
